package com.xdclass.user.controller;

import com.xdclass.user.service.FileService;
import com.xdclass.user.service.UserService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class UserController {


//    @Reference(version = "1.0.0",check =false)//具体某个接口启动时不检查
    @Autowired
    private UserService userService;

    @Autowired
    private FileService fileService;

    @RequestMapping("/sayHello")
    public String sayHello() {
        return userService.sayHello();
    }

    @RequestMapping("/upload")
    public void upload(@RequestParam(value = "msg") String msg) {
        fileService.upload(msg);
    }
}
